<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="../common/verify.jsp" %>
<jsp:include page="../common/meta.jsp"></jsp:include>
<jsp:include page="../common/easyui.jsp"></jsp:include>
<script type="text/javascript">
	var indexLayout;
	var centerTabs;
	$(function() {
		// 界面布局
		indexLayout = $('#indexLayout').layout();
		indexLayout.layout('collapse', 'east');

		// 主界面选项卡
		centerTabs = $('#centerTabs').tabs({
			border : false,
			fit : true,
			tools:[{
				iconCls:'icon-back',
				handler: function(){
					$.messager.confirm('注销提示', '您确定退出系统吗?', function(r){
						if(r){
							logout();
						}
					});
				}
			}]
		});

		// 添加默认选项卡
		centerTabs.tabs('add', {
			title : '欢迎',
			href : 'welcome.jsp',
			closable : false
		});

	});
	
	function logout(){
		$.ajax({
			url : '/com.sundaying.gooway/admin/logoutUserJson',
			cache : false,
			dataType : "json",
			success : function(response) {
				$.messager.show({
					title : '提示',
					msg : '退出成功！'
				});
				window.location = "../index.jsp";
			}
		});
	}
</script>
<title>首页|网站后台管理|<%=basePath%></title>
</head>
<body style="width: 960px; height: 720px; margin: 0 auto;">
	<div id="indexLayout" class="easyui-layout" style="width: 960px; height: 720px;">
		<div region="north" href="../common/header.jsp" split="false"
			style="height: 80px;"></div>
		<div region="south" href="../common/footer.jsp" style="height: 50px;"></div>
		<div region="west" href="siderbar.jsp" split="true" title="导航栏"
			style="width: 200px;"></div>
		<div region="east" split="true" title="提示信息" style="width: 200px;"></div>
		<div region="center" title="主界面" >
			<div id="centerTabs" class="easyui-tabs" fit="true" border="false">
			</div>
		</div>
	</div>
</body>
</html>